Is JavaScript Code can be broke down into several lines? Nishi Tiwari97305-Feb-2020javascriptjavascript Updated on 13-Sep-2020
Nishi Tiwari
05-Feb-2020Within a string statement breaking can be done by the use of a backslash, '\', at the end of the first line
For example:
document.write("This is \a program");
If we change to a new line when not within a string statement, then javaScript ignores break in the line.
For example:
var x=1, y=2,
z=
x+y;
The above code is perfectly good, but it is not advisable as it hampers debugging.